<template>
  <div class="loading">
    <div v-for="i in 5" :key="i" class="loading_item"></div>
  </div>
</template>

<style lang="scss" scoped>
.loading {
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  display: flex;
  &_item {
    height: 100px;
    width: 20px;
    border-radius: 30px;
    background-color: pink;
    margin: 0 5px;
    animation: jumpAnimation 1s linear infinite;
    @for $i from 1 through 5 {
      &:nth-child(#{$i}) {
        animation-delay: $i * 0.2s;
      }
    }
  }
}
@keyframes jumpAnimation {
  0%,
  100% {
    height: 100px;
  }
  20% {
    height: 80px;
  }
  40% {
    height: 60px;
  }
  60% {
    height: 40px;
  }
  80% {
    hieght: 20px;
  }
}
</style>